<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js"></script>
    <script src="https://cdn.staticfile.org/echarts/5.1.0/echarts.min.js"></script>

    <title>stock</title>
    <style>
        body {
            width: 100%;
            height: 100%;
        }

        .stock {
            width: 100%;
            height: 100%;
            display: grid !important;
            align-items: center;
            margin: 50px auto;
            justify-content: center;
        }
    </style>
</head>

<body>
    <div class="stock">
        <div style="margin: 20px 0">
            <label for="symbol" class="">Stock symbol:</label>
            <input type="text" id="symbol" name="symbol" list="ide" class="">
            <datalist id="ide"></datalist>
        </div>
        <div id="chart" style="width: 600px;height: 300px;background-color: antiquewhite;"></div>

    </div>
    <script>
        var option = {
            xAxis: {
                type: 'time',
                show: false,
            },
            yAxis: {
                type: 'value',
                show: false,
            },
            series: [
                {
                    type: 'line',
                    data: [
                        ['2020-02-01 10:10:10', 100],
                        ['2020-03-01 10:10:10', 80],
                        ['2020-04-01 10:10:10', 100],
                        ['2020-05-01 10:10:10', 70],
                        ['2020-06-01 10:10:10', 39],
                        ['2020-07-01 10:10:10', 24],
                    ],
                    areaStyle: {
                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                            offset: 0,
                            color: 'rgba(58,77,233,0.8)'
                        }, {
                            offset: 1,
                            color: 'rgba(58,77,233,0.3)'
                        }])
                    },
                }]
        };
        // myChart.setOption(option);
        let myChart = echarts.init(document.getElementById("chart"));

        // option.series[0].data = ch_data;
        myChart.setOption(option);

    </script>
</body>

</html>